#ifndef _QEDITORWINDOW_H
#define _QEDITORWINDOW_H


#include "qansieditor.h"
#include <QMainWindow>
#include <QtCore/QTextCodec>


class QPushButton;


namespace QAnsiEditor {


class QAnsiWidget;
class QAnsiPalette;
class QColorWidget;
class QCharWidget;


class QEditorWindow: public QMainWindow
{

    Q_OBJECT

public:
    QEditorWindow(QWidget* parent = 0, Qt::WFlags wflags = Qt::Window);
    ~QEditorWindow();
    QAnsiWidget *getAnsiWidget() {
        return m_pAnsiWidget;
    }

private:
    QAnsiWidget *m_pAnsiWidget;
    QColorWidget *m_pColorWidget;
    QCharWidget *m_pCharWidget;
    QMenu *fileMenu;
    QMenu *editMenu;
    QMenu *viewMenu;
    QMenu *toolsMenu;
    QMenu *helpMenu;
    QToolBar *fileToolBar;
    QToolBar *editToolBar;
    QAction *newAct;
    QAction *openAct;
    QAction *saveAct;
    QAction *exitAct;
    QAction *undoAct;
    QAction *redoAct;
    QAction *cutAct;
    QAction *copyAct;
    QAction *pasteAct;
    QAction *settingsAct;
    QAction *aboutAct;
    QAction *aboutQtAct;

public:
    void createAction();
    void createMenu();
    void createToolBar();
    void createStatusBar();
    void createColorDock();
    void createCharDock();

public slots:
    void newFile();
    void open();
    void save();
    void undo();
    void redo();
    void cut();
    void copy();
    void paste();
    void settings();
    void about();

};


}  // namespace QAnsiEditor


#endif  // _QEDITORWINDOW_H
